<?php
include ("../cgi-bin/global.inc.php");
include ("fonctions.php");

	$sql = "SELECT doc.fichier,doc.id FROM doc " ;
	$resultat = mysql_query($sql)or die("Imprimer cette page : <br>erreur sql<br>sql = ".$sql);
	while($table_liste = mysql_fetch_object($resultat))				
		{
			$sql  ="update doc set type='".substr($table_liste->fichier,-3)."' "; 
			$sql .=" where id= $table_liste->id "; 
			$resultat2 = mysql_query($sql) or die("Imprimer cette page : <br>erreur sql = ".$sql);
		}	
?>	
